<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>展馆存量统计</title>
	<meta name="decorator" content="default"/>
	
	<script type="text/javascript">
		$(function () {
			$("#goodsNames").selectpicker();  //初始化
		})
	</script>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/guobo/exhstockreport/">展馆存量统计</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="exhStockReport" action="${ctx}/guobo/exhstockreport/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form in-block-li" style='overflow:visible;'>
			<li><label>物料编码：</label>
				<form:input path="assetCode" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>物料名称：</label>
				<form:input path="assetName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<%-- <li><label>物料规格：</label>
				<form:input path="assetSpec" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>物料型号：</label>
				<form:input path="assetModle" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li> --%>
			<li><label>展馆：</label>
				<select id='goodsNames' title='未选择' name="choiceHall" class="selectpickerl" multiple='multiple'>
					<c:forEach items="${allExhHalls}" var="exhall">
						<option value='${exhall.id}'>${exhall.name}</option>
					</c:forEach>
		        </select>
			</li>			
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
		<div style='claer:both;height:1px;'></div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>部门</th>
				<th>物料编码</th>
				<th>物料名称</th>
				<th>物料规格</th>
				<th>物料型号</th>
				<c:forEach items="${exhHalls}" var="exhall">
					<th>${exhall.name}</th>
				</c:forEach>
				<th>合计</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="exp">
			<tr>
				<td>
					${exp.mandeptName}					
				</td>
				<td>
					${exp.assetCode}					
				</td>
				<td>
					${exp.assetName}
				</td>
				<td>
					${exp.assetSpec}
				</td>
				<td>
					${exp.assetModle}
				</td>
				<c:forEach items="${exp.exhStocks}" var="exhStock">
					<td>
						${exhStock.totalNum}
					</td>
				</c:forEach>
				<td>
					${exp.totalNum}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>